#!/usr/bin/env bash

help(){
    cat<<__EOF__
Usage: m touchbar [OPTION]

Description: Manage the touchbar on MacOS.

Options:
  --help        Show this help message
  --reset       Reset the touchbar
__EOF__
}


# Force a reset of the touchbar and the control strip
touchbar_reset(){
    pkill "Touch Bar agent" 2>/dev/null
    killall ControlStrip 2>/dev/null
}

case $1 in
    help)
        help
        ;;
    --reset)
        touchbar_reset
        ;;
    *)
        help
        ;;
esac
